<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/8/12
 * Time: 10:41
 */
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;
use common\components\widgets\Datetimepicker;
use yii\helpers\Html;
LayerConfirmWidget::widget();
LayerIframeWidget::widget();
Datetimepicker::widget();


?>

    <div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
        <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
            <?= Html::beginForm(\common\components\helpers\Fun::url(['accountrecord/recharge']), 'get', ['enctype' => 'multipart/form-data']) ?>
            <?= \common\components\helpers\Search::textInput('searchDate', null, ['label'=>'充值日期','class' => 'search datetimepicker yx-width150 zx-lh24 yx-ml6']); ?>
            <?=\common\components\helpers\Search::dropDownList('searchWay',null,[null=>'请选择','1'=>'按月','2'=>'按日'],['label'=>'按月按日','promote'=>'请选择','class'=>'search diy_select_txt'])?>
            <?= \common\components\helpers\Search::textInput('tel', null, ['label'=>'会员手机号','class' => 'search yx-width150 zx-lh24 yx-ml6']); ?>
            <?= \common\components\helpers\Search::textInput('name', null, ['label'=>'会员名称','class' => 'search yx-width150 zx-lh24 yx-ml6']); ?>
            <?= \common\components\helpers\Search::submitButton('搜索', ['id'=>'search-handle','class'=>"yx-search yx-radius2"]); ?>
            <?php Html::endForm() ?>
            <div class="yx-clear"></div>
        </div>
        <div id="data_totals" class="zx-mg"><?= $content ?></div>
        <div class="docs-main zx-mg">
            <table id="tablesaw" class="tablesaw table yx-table1 yx-table5 table-striped with-check"  data-tablesaw-mode="swipe" data-tablesaw-minimap>
                <thead>
                <tr class="yx-bgd2f6ec">
                    <th><?= \Yii::t('zhtfrontend', 'ID'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', '会员名称'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', '支付总额'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', '现金支付'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', '会员卡支付'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', 'pos支付'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', '赠送金额'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', '操作员'); ?></th>
                    <th><?= \Yii::t('zhtfrontend', '创建时间'); ?></th>
                </tr>
                </thead>
                <?php if ($data): ?>
                    <?php foreach ($data as $item): ?>
                        <tr data-id="<?= $item['id'] ?>">
                            <td><?= $item['id'] ?></td>
                            <td><?= $item['customer_name'] ?></td>
                            <td><?= $item['cash'] ?></td>
                            <td><?= $item['pay_cash'] ?></td>
                            <td><?= $item['pay_card'] ?></td>
                            <td><?= $item['pay_pos'] ?></td>
                            <td><?= $item['free'] ?></td>
                            <td><?= $item['admin_name'] ?></td>
                            <td><?= $item['created_at'] ?></td>
                        </tr>
                    <?php endforeach; ?>
                <?php endif; ?>
            </table>
            <div style="text-align: right"><?= common\components\widgets\GoPager::widget(['pagination' => $pages]) ?></div>
        </div>
    </div>
